NNNNOOOOTTTTEEEE:::: these routines are all obsolete and are provided for backward
compatibility only. All access to or modification of these files must be
done via the _gggg_eeee_tttt_uuuu_tttt_xxxx(3C) set of interfaces.
_gggg_eeee_tttt_uuuu_tttt_eeee_nnnn_tttt, _gggg_eeee_tttt_uuuu_tttt_iiii_dddd, _gggg_eeee_tttt_uuuu_tttt_llll_iiii_nnnn_eeee, and _pppp_uuuu_tttt_uuuu_tttt_llll_iiii_nnnn_eeee each return a pointer to a
_gggg_eeee_tttt_uuuu_tttt_eeee_nnnn_tttt reads the next entry from a _uuuu_tttt_mmmm_pppp-like file. If the file is not
already open, it opens it. If it reaches the end of the file, it fails.
_gggg_eeee_tttt_uuuu_tttt_iiii_dddd searches forward from the last entry read or, if no entries have
been read, from the first entry in the _uuuu_tttt_mmmm_pppp file until it finds an entry
with a _u_t__t_y_p_e matching _iiii_dddd->ut_type if the type specified is _RRRR_UUUU_NNNN______LLLL_VVVV_LLLL,
_BBBB_OOOO_OOOO_TTTT______TTTT_IIII_MMMM_EEEE, _OOOO_LLLL_DDDD______TTTT_IIII_MMMM_EEEE, or _NNNN_EEEE_WWWW______TTTT_IIII_MMMM_EEEE. If the type specified in _iiii_dddd is
_IIII_NNNN_IIII_TTTT______PPPP_RRRR_OOOO_CCCC_EEEE_SSSS_SSSS, _LLLL_OOOO_GGGG_IIII_NNNN______PPPP_RRRR_OOOO_CCCC_EEEE_SSSS_SSSS, _UUUU_SSSS_EEEE_RRRR______PPPP_RRRR_OOOO_CCCC_EEEE_SSSS_SSSS, or _DDDD_EEEE_AAAA_DDDD______PPPP_RRRR_OOOO_CCCC_EEEE_SSSS_SSSS, then _gggg_eeee_tttt_uuuu_tttt_iiii_dddd
will return a pointer to the first entry whose type is one of these four
and whose _uuuu_tttt______iiii_dddd field matches _iiii_dddd->ut_id. If the end of file is reached
without a match, it fails.
_gggg_eeee_tttt_uuuu_tttt_llll_iiii_nnnn_eeee searches forward from the last entry read or, if no entries
have been read, from the first entry in the _uuuu_tttt_mmmm_pppp file until it finds an
entry of the type _LLLL_OOOO_GGGG_IIII_NNNN______PPPP_RRRR_OOOO_CCCC_EEEE_SSSS_SSSS or _UUUU_SSSS_EEEE_RRRR______PPPP_RRRR_OOOO_CCCC_EEEE_SSSS_SSSS that also has a _u_t__l_i_n_e
string matching the _llll_iiii_nnnn_eeee->ut_line string. If the end of file is reached
without a match, it fails.
_pppp_uuuu_tttt_uuuu_tttt_llll_iiii_nnnn_eeee writes the supplied _uuuu_tttt_mmmm_pppp structure into the _uuuu_tttt_mmmm_pppp file. It uses
_gggg_eeee_tttt_uuuu_tttt_iiii_dddd to search forward for the proper place if it finds that it is not
already there. It is expected that normally the user of _pppp_uuuu_tttt_uuuu_tttt_llll_iiii_nnnn_eeee will
have searched for the proper entry using one of the _gggg_eeee_tttt_uuuu_tttt routines. If
so, _pppp_uuuu_tttt_uuuu_tttt_llll_iiii_nnnn_eeee will not search. If _pppp_uuuu_tttt_uuuu_tttt_llll_iiii_nnnn_eeee does not find a matching
slot for the new entry, it will add a new entry to the end of the file.
It returns a pointer to the _uuuu_tttt_mmmm_pppp structure.
_ssss_eeee_tttt_uuuu_tttt_eeee_nnnn_tttt resets the input stream to the beginning of the file. This
reset should be done before each search for a new entry if it is desired
that the entire file be examined.
_eeee_nnnn_dddd_uuuu_tttt_eeee_nnnn_tttt closes the currently open file.
_uuuu_tttt_mmmm_pppp_nnnn_aaaa_mmmm_eeee allows the user to change the name of the file examined, from
_////_vvvv_aaaa_rrrr_////_aaaa_dddd_mmmm_////_uuuu_tttt_mmmm_pppp to any other file. It is most often expected that this
other file will be _////_vvvv_aaaa_rrrr_////_aaaa_dddd_mmmm_////_wwww_tttt_mmmm_pppp. If the file does not exist, this will
not be apparent until the first attempt to reference the file is made.
_uuuu_tttt_mmmm_pppp_nnnn_aaaa_mmmm_eeee does not open the file. It just closes the old file if it is
currently open and saves the new file name. If the file name given is
longer than 79 characters, _uuuu_tttt_mmmm_pppp_nnnn_aaaa_mmmm_eeee returns 0. Otherwise, it returns 1.
A null pointer is returned upon failure to read, whether for permissions
or having reached the end of file, or upon failure to write.
WWWWAAAARRRRNNNNIIIINNNNGGGG
All changes to _////_vvvv_aaaa_rrrr_////_aaaa_dddd_mmmm_////_wwww_tttt_mmmm_pppp must also be logged in _////_vvvv_aaaa_rrrr_////_aaaa_dddd_mmmm_////_wwww_tttt_mmmm_pppp_xxxx. Most
commands that extract information from these files silently discard all
_wwww_tttt_mmmm_pppp_xxxx entries without corresponding _wwww_tttt_mmmm_pppp entries.
These routines all assume the existence of "_u_t_m_p_x" like file. Many won't
The most current entry is saved in a static structure. Multiple accesses
require that it be copied before further accesses are made. On each call
to either _gggg_eeee_tttt_uuuu_tttt_iiii_dddd or _gggg_eeee_tttt_uuuu_tttt_llll_iiii_nnnn_eeee, the routine examines the static structure
before performing more I/O. If the contents of the static structure
match what it is searching for, it looks no further. For this reason, to
use _gggg_eeee_tttt_uuuu_tttt_llll_iiii_nnnn_eeee to search for multiple occurrences, it would be necessary
to zero out the static area after each success, or _gggg_eeee_tttt_uuuu_tttt_llll_iiii_nnnn_eeee would just
return the same structure over and over again. There is one exception to
the rule about emptying the structure before further reads are done. The
implicit read done by _pppp_uuuu_tttt_uuuu_tttt_llll_iiii_nnnn_eeee (if it finds that it is not already at
the correct place in the file) will not alter the contents of the static
structure returned by the _gggg_eeee_tttt_uuuu_tttt_eeee_nnnn_tttt, _gggg_eeee_tttt_uuuu_tttt_iiii_dddd or _gggg_eeee_tttt_uuuu_tttt_llll_iiii_nnnn_eeee routines, if the
user has just modified those contents and passed the pointer back to
_pppp_uuuu_tttt_uuuu_tttt_llll_iiii_nnnn_eeee.
_gggg_eeee_tttt_uuuu_tttt_eeee_nnnn_tttt, _gggg_eeee_tttt_uuuu_tttt_iiii_dddd, _gggg_eeee_tttt_uuuu_tttt_llll_iiii_nnnn_eeee, and _pppp_uuuu_tttt_uuuu_tttt_llll_iiii_nnnn_eeee, place file locks on files
used during function execution. File locks are not held across calls to
these or other functions, but signals may interrupt the execution of
these functions allowing file locks to be held. When using these
functions where a signal may interrupt function execution, _eeee_nnnn_dddd_uuuu_tttt_eeee_nnnn_tttt
should be called by signal handlers to release any file locks acquired by